<?php
include "../dbase/db.php";
$id=intval($_GET['id']);//获取变量整数值
if(empty($id)){
    die("ID不能为空");
}
$sql=mysql_query("delete from catagory where id=$id");
if($sql){
    $b=<<<fgd
    <script>
    alert("删除成功");
    window.location.href="category.php";
    </script>
fgd;
echo $b;
}
else{
    die("删除失败");
}